<%@ page language="java" import="java.util.*,pojo.*,service.*,base.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="../bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
    <style type="text/css">
    .container{
    width:300px;
    }  
    </style>
<script type="text/javascript" src="../jquery/jquery-1.6.1.js"></script>
<script type="text/javascript">


</script>
  </head>
  <body>
  <%
  int orderid = Integer.parseInt(request.getParameter("orderid"));
  int pay = Integer.parseInt(request.getParameter("pay"));
   OrderService os = new OrderService();
  int r = os.getOrderDetail(orderid).getPay();
 
  if(r==0){
  os.pay1(orderid,pay);
  os.pay(orderid);
  response.sendRedirect("../../website/paySuccess.jsp");
  session.setAttribute("ss",orderid);
  }
  else {response.sendRedirect("../../website/payFail.jsp");
   session.setAttribute("ss",orderid);
  }

   %>
 <input type="hidden"  name="orderid"  value="<%=Integer.parseInt(request.getParameter("orderid"))%>">
    
   
    <script src="../bootstrap/js/bootstrap.js"></script>
    <script src="../bootstrap/js/bootstrap.min.js"></script>
  </body>
</html>
